package com.lottery.material.service.portal.portaluser.impl;

import com.lottery.material.dao.base.BaseDao;
import com.lottery.material.dao.portal.portaluser.ValidateCodeRecordDao;
import com.lottery.material.entity.portaluser.ValidateCodeRecord;
import com.lottery.material.service.base.impl.BaseServiceImpl;
import com.lottery.material.service.portal.portaluser.ValidateCodeRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class ValidateCodeRecordServiceImpl extends BaseServiceImpl<ValidateCodeRecord, Integer> implements ValidateCodeRecordService {

    @Autowired
    ValidateCodeRecordDao validateCodeRecordDao;

    @Override
    public BaseDao<ValidateCodeRecord, Integer> getBaseDao() {
        return validateCodeRecordDao;
    }

    @Override
    public ValidateCodeRecord findFirstByPhoneNumberOrderByCreateTimeDesc(String phoneNumber) {
        return validateCodeRecordDao.findFirstByPhoneNumberOrderByCreateTimeDesc(phoneNumber);
    }
}
